package com.turtle3d.formallanguage.symbol;

import java.util.Hashtable;

public abstract class MethodAdapter implements Method
{
	
	private Hashtable<String, Float> defaultParameters;
	private Symbol removedSymbol;
	public boolean calculate(Symbol removedSymbol, Symbol calculatedSymbol, Hashtable<String, Float> defaultParameters)
	{
		this.removedSymbol=removedSymbol;
		this.defaultParameters=defaultParameters;
		
		return calculate(calculatedSymbol);		
	}
	
	public Float getParameter(String name){
		/*Float p = removedSymbol.getParameter(name);
		if(p==null)
			return defaultParameters.get(name);
		else
			return p;*/
		return removedSymbol.getParameter(name);
	}
	
	public abstract boolean calculate(Symbol calculatedSymbol);			
	
}
